<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    /* 第一种 */
    .header {
      margin: 0 auto;
      max-width: 960px;
      height: 100px;
      background-color: blue;
    }
    .content {
      margin: 0 auto;
      max-width:960px;
      height: 400px;
      background-color:pink;
    }
    .footer {
      margin: 0 auto;
      max-width: 960px;
      height: 100px;
      background-color:orange;
    }
  </style>
</head>

<body>
  <div class="header"></div>
  <div class="content"></div>
  <div class="footer"></div>
</body>

</html>